package org.msfj.hospital.api;

import org.msfj.common.model.CommonResult;
import org.msfj.hospital.service.HospitalEvaluateService;
import org.msfj.hospital.vo.HospitalEvaluateVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description: 医院评价接口
 * @User: Administrator
 * @Date: 2018/8/19 0019
 */
@RestController
@RequestMapping("api/hospital")
public class HospitalEvaluateApiController {
    @Autowired
    HospitalEvaluateService hospitalEvaluateService;

    /**
     * 插入评价数据
     *
     * @param hospitalEvaluateVo
     * @return
     */
    @PostMapping("/insertHospitalEvaluate")
    public CommonResult insertHospitalEvaluate(HospitalEvaluateVo hospitalEvaluateVo) {
        return CommonResult.ok(hospitalEvaluateService.saveOrEdit(hospitalEvaluateVo));
    }
}
